<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<title><?php echo C('TITLE');?></title>
	<meta name="keywords" content="<?php echo C('KEYWORD');?>" />
	<meta name="description" content="<?php echo C('DESCRIPTION');?>" />
	<link href="/Public/skin/css/css.css" rel="stylesheet" type="text/css" />
	<link href="/Public/skin/css/lrtk.css" rel="stylesheet" type="text/css" />
	<script src="/Public/skin/js/jquery-1.11.1.min.js" type="text/javascript"></script>
	<script src="/Public/skin/js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="/Public/skin/js/lrtk.js"></script>
</head>

<body style="position:relative;">
    <!--nav 开始-->
	<div id="header">
    <a class="logo" href="/">
        <img src="/Public/skin/images/logo.jpg" />
    </a>
    <ul class="nav">
        <li>
            <a <?php if($nav_active == 'index'): ?>class="now"<?php endif; ?> href="/">首页</a>
        </li>
        <li>
            <a <?php if($nav_active == 'rank'): ?>class="now"<?php endif; ?> href="<?php echo U('rank/index');?>">赛事排名</a>
        </li>
        <li>
            <a <?php if($nav_active == 'join'): ?>class="now"<?php endif; ?> href="<?php echo U('join/index');?>">招商加盟</a>
        </li>
        <li>
            <a <?php if($nav_active == 'communicate'): ?>class="now"<?php endif; ?> href="<?php echo U('communicate/index');?>">交流吧</a>
        </li>
        <li>
            <a <?php if($nav_active == 'joinus'): ?>class="now"<?php endif; ?> href="<?php echo U('joinus/index');?>">加入我们</a>
        </li>
    </ul>
    <ul class="login">
        <?php if($_SESSION['user']['id'] == ''): ?><li class="l">
                <a href="<?php echo U('login/index');?>">
                    <img src="/Public/skin/images/user.jpg" />登录</a>
            </li>
            <li class="r">
                <a href="<?php echo U('register/index');?>">免费注册</a>
            </li>
        <?php else: ?>
            <li class="l">
                <a href="<?php echo U('user/index');?>">
                    <img src="/Public/skin/images/user.jpg" /><?php echo ($_SESSION['user']['nicename']); ?></a>
            </li>
            <li class="r">
                <a href="<?php echo U('user/loginout');?>">退出</a>
            </li><?php endif; ?>
    </ul>
    <div class="clear"></div>
</div>
    <!--nav 结束-->

    <!--招商加盟 开始-->
    <div id="join_banner">
        <img src="/Public/skin/images/b1.jpg" />
    </div>
    <form id="Join_From">
    <div id="join_box">
        <div class="box">
            <ul class="xz">
                <Li class="l">
                    <img src="/Public/skin/images/j2.jpg" />
                    <h1>-&nbsp;当今怪象&nbsp;-</h1>
                </Li>
                <li>
                    <img src="/Public/skin/images/j1.jpg" />
                    <h1>-&nbsp;探王作用&nbsp;-</h1>
                </li>
            </ul>
            <div class="clear"></div>
        </div>

        <div class="join_infor">
            <h1>申请加盟</h1>
            <p class="not">加盟公司必须从事金融相关的行业，所填写的信息必须真实有效并且接受我方的核查，加盟公司根据自己的需求向我方说明所需人才职务，操作风格，性格，年龄等信息，同时必须说明薪资待遇和职务方便我方配对。加盟商也可以提供自己意向人才，由我方向加盟商意向发出求才意向，双方平等自愿协商，我方提供协助，但我方不对双方协商结果做担保或者保证。</p>
            <div class="biaodan">
                <div class="l">法人姓名
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="frxm" id="frxm" value="<?php echo ($joins['frxm']); ?>" />
                </div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">身份证
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="sfz" id="sfz" value="<?php echo ($joins['sfz']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>

            <div class="biaodan">
                <div class="l">营业执照
                    <span>*</span>
                </div>
                <div class="head-pic-pick" style="display: block"></div>
                <div class="file-box">
                    <input type="text" name="yyzz" id="yyzz" class="txt" readonly="readonly" value="<?php echo ($joins['yyzz']); ?>"  />
                    <input type="button" class="btn upload-btn" value="浏览..." />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">场地面积
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="cdmj" id="cdmj" value="<?php echo ($joins['cdmj']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">人员人数
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="ryrs" id="ryrs" value="<?php echo ($joins['ryrs']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">负责人
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="fzr" id="fzr" value="<?php echo ($joins['fzr']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">负责人手机
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="fzrsj" id="fzrsj" value="<?php echo ($joins['fzrsj']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">意向人才
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="yxrc" id="yxrc" value="<?php echo ($joins['yxrc']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l">人才薪资
                    <span>*</span>
                </div>
                <div class="m">
                    <input type="text" name="rcxz" id="rcxz" value="<?php echo ($joins['rcxz']); ?>" />
                </div>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
            <div class="biaodan">
                <div class="l"></div>
                <?php if($_SESSION['user']['id'] == ''): ?><div class="zcbtn">
                        <a href="<?php echo U('login/index');?>">立即加盟</a>
                    </div>
                <?php else: ?>
                    <?php if($joins['status'] == 0): ?><div class="zcbtn submit" data-id="0">
                            <a href="javascript:void(0);">立即加盟</a>
                        </div>
                    <?php else: ?>
                        <div class="zcbtn submit" data-id="1">
                            <a href="javascript:void(0);">修改加盟信息</a>
                        </div><?php endif; endif; ?>
                <div class="r"></div>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    </form>

    <!--支付-->
    <form id="Payment_From">
        <div class="tanc" id="testD" style="display:none;">
            <a class="close" onclick="testCloseDisplay()">X</a>
            <ul>
                <Li>加盟费：
                    <span>¥<?php echo C('JIONCOST');?></span>
                </Li>
            </ul>
            <div class="clear"></div>
            <h4>请选择支付方式</h4>
            <div class="zf_box">
                <div class="zf">
                    <input type="radio" name="zffs_type" value="WEIXIN" />
                    <img src="/Public/skin/images/wx.jpg" />
                    <span>微信支付</span>
                </div>
                <div class="zf">
                    <input type="radio" name="zffs_type" value="ZFB" checked="checked" />
                    <img src="/Public/skin/images/zub.jpg" />
                    <span>支付宝支付</span>
                </div>
                <div class="clear"></div>
            </div>
            <div class="zf_btn">
                <a id="payment">立即支付</a>
            </div>
        </div>
    </form>
    <!--招商加盟 结束-->

    <!--footer 开始-->
<div id="footer" class="clearfix">
    <div class="clt2">
        <img src="/Public/skin/images/gzh.png" />
        <p>更多信息请关注公众号</p>
    </div>
    <div class="clt">
        <center class="yqlj-pic"><a href="http://www.hexun.com/" target="_blank"><img src="/Public/skin/images/hx_logo.png"></a></center>
        <p>Copyright © 2010-2017 深圳市森鹏猎头有限公司版权所有 </p>
        <p>备案：粤ICP备17133948号</p>
    </div>
    <div class="crt">
        <img src="/Public/skin/images/awm.jpg" />
    </div>
</div>
<!--footer 结束-->

<img id="piaoc" src="/Public/skin/images/pc.jpg" />
<!-- 飘窗代码 开始 -->
<div id="main">
    <div id="pop" style="display:none;">
        <div id="popHead">
            <a id="popClose" title="关闭">关闭</a>
            <h2></h2>
        </div>
        <div id="popContent">
            <a href="<?php echo U('login/index');?>" target="_blank">
                <img src="/Public/skin/images/300x250.jpg">
            </a>
        </div>
    </div>
    <script>
        var popad = new Pop();
    </script>
</div>
<!-- 飘窗代码 结束 -->

<!--QQ飘浮-->
<div id="qqPiaofu">
    <ul>
        <li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=360252858&site=qq&menu=yes">360252858</a></li>
        <li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=360252858&site=qq&menu=yes">360252858</a></li>
        <li><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=360252858&site=qq&menu=yes">360252858</a></li>
    </ul>
</div>

    <script type="text/javascript" src="/Public/javascripts/admin/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/Public/javascripts/admin/jquery.form.js"></script>
    <script type="text/javascript" src="/Public/skin/layer/layer.js"></script>
    <script type="text/javascript" src="/Public/skin/functions.js"></script>
    <script type="text/javascript">
        function testDisplay() {
            $('#testD').show();
        }

        function testCloseDisplay() {
            $('#testD').hide();
        }

        $(function () {
            // 申请加盟
            $(".submit").click(function () {
                var dataId = $(this).attr('data-id');
                if ($("#frxm").val() == '') {
                    layer.alert('请输入法人姓名！', { icon: 2,closeBtn: 0 });
                    $('#frxm').focus();
                    return false;
                }

                if ($("#sfz").val() == '') {
                    layer.alert('请输入身份证！', { icon: 2,closeBtn: 0 });
                    $('#sfz').focus();
                    return false;
                }

                if (!checkIdcard($('#sfz').val())) {
                    layer.alert('请输入合法的身份证！', { icon: 2,closeBtn: 0 });
                    $('#sfz').focus();
                    return false;
                }

                if ($("#yyzz").val() == '') {
                    layer.alert('请上传营业执照！', { icon: 2,closeBtn: 0 });
                    $('#yyzz').focus();
                    return false;
                }

                if ($("#cdmj").val() == '') {
                    layer.alert('请输入场地面积！', { icon: 2,closeBtn: 0 });
                    $('#cdmj').focus();
                    return false;
                }

                if ($("#ryrs").val() == '') {
                    layer.alert('请输入人员人数！', { icon: 2,closeBtn: 0 });
                    $('#ryrs').focus();
                    return false;
                }

                if ($("#fzr").val() == '') {
                    layer.alert('请输入负责人！', { icon: 2,closeBtn: 0 });
                    $('#fzr').focus();
                    return false;
                }

                if ($("#fzrsj").val() == '') {
                    layer.alert('请输入负责人手机！', { icon: 2,closeBtn: 0 });
                    $('#fzrsj').focus();
                    return false;
                }

                if (!isMobile($("#fzrsj").val())) {
                    layer.alert('请输入合法的负责人手机号码！',{icon: 2,closeBtn: 0});
                    $('#fzrsj').focus();
					return false;
                } 

                if ($("#yxrc").val() == '') {
                    layer.alert('请输入意向人才！', { icon: 2,closeBtn: 0 });
                    $('#yxrc').focus();
                    return false;
                }

                if ($("#rcxz").val() == '') {
                    layer.alert('请输入人才薪资！', { icon: 2,closeBtn: 0 });
                    $('#rcxz').focus();
                    return false;
                }

                var url = "<?php echo U('Join/join_chk');?>";
                $('#Join_From').ajaxSubmit({
                    url:url,
                    type:"POST",
                    success:function(data, st) {
                        if (data.status == 1) {
                            if (data.url&&data.url!='') {
                                layer.confirm(data.info, {
                                    btn: ['确定'],
                                    icon: 1,
                                    closeBtn: 0
                                }, function(){
                                    window.location.href = data.url;
                                });
                            } else {
                                //弹出支付
                                if (dataId == 0) {
                                    testDisplay();
                                } else {
                                    layer.alert('修改加盟信息成功！', {icon: 1,closeBtn: 0});
                                }
                            }
                        } else if(data.status ==0&&data.url&&data.url!='') {
                            layer.confirm(data.info, {
                                btn: ['取消','确定'],
                                icon: 0,
                                closeBtn: 0
                            }, function(){
                                layer.closeAll();
                            }, function(){
                                window.location.href = data.url;
                            });
                        } else {
                            layer.alert(data.info, {icon: 2,closeBtn: 0});
                        }
                    }
                });
            });

            //支付
            $('#payment').click(function() {
                var zffs_type = $("input[name='zffs_type']:checked").val();
                var Url = '<?php echo U("Join/payment");?>'+"?zffs_type="+zffs_type;
                window.open(Url);
            })
        });
    </script>

    <script type="text/javascript" src="/Public/skin/dist/webuploader.custom.min.js"></script>
    <script type="text/javascript">
        //营业执照
        $('.upload-btn').click(function(){
            $('.head-pic-pick').find('.webuploader-element-invisible').trigger("click");           
        });
        
        var where_uploader = WebUploader.create({
            auto:true,
            // swf文件路径
            swf: "/Public/skin/dist/Uploader.swf",
            server: "/Public/uploads/smeta_upload.php",
            pick: {
                id: '.head-pic-pick',
                multiple: false
            },
                
            sendAsBinary : true,
            thumb : false,
            compress : { 
                quality: 70,
                noCompressIfLarger: false,
                allowMagnify: false,
                compressSize: 204800
            },
                
            accept: {
                title: 'Images',
                extensions: 'gif,jpg,jpeg,bmp,png',
                mimeTypes: 'image/*'
            }
        });
            
        where_uploader.on('fileQueued', function(file){
            where_uploader.makeThumb(file, function( error, ret) {
                if ( error ) {
                    alert("预览失败！");
                } else {
                }
            });
        });
            
        // 开始上传
        where_uploader.on('startUpload', function(){
        });  
                
        where_uploader.on('uploadSuccess', function(file, ret) {
            if(ret.status == 1){
                $('#yyzz').val(ret.path);
                upload_success = true;
            } else {
                alert("上传失败！");
            }         
        }); 
            
        where_uploader.on('uploadError', function(file, reason) {
            alert("上传失败！");
        });
    </script>
</body>

</html>